package com.bw.lib_base.utils

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.load.resource.bitmap.CenterCrop
import com.bumptech.glide.load.resource.bitmap.RoundedCorners

object GlideUtil {
    fun getImg(url: String, imageView: ImageView){
        Glide.with(imageView).load(url).into(imageView)
    }

    fun getCircleImg(url: String, imageView: ImageView){
        Glide.with(imageView).load(url).circleCrop().into(imageView)
    }

    fun getRoundImg(url: String, imageView: ImageView, radius: Int){
        Glide.with(imageView).load(url).transform(CenterCrop(),RoundedCorners(radius)).into(imageView)
    }
}